HI Chris,
Congratulations on the effort making LWP works with Crypt::SSLeay. Can
you share your code how you did it. I've working on this for a while
and still no luck.
Here is my code:
use LWP::UserAgent;
use HTTP::Request;
use HTTP::Response;
use Crypt::SSLeay;
LWP::Debug::level('+conns');
LWP::Debug::level('+trace');
LWP::Debug::level('+debug');
# HTTPS Proxy Support
$ENV{HTTPS_PROXY} =3D 'http://sa1isa4:80';
# PROXY_BASIC_AUTH
$ENV{HTTPS_PROXY_USERNAME} =3D 'username'; $ENV{HTTPS_PROXY_PASSWORD} =3D
'password'; # DEBUGGING SWITCH / LOW LEVEL SSL DIAGNOSTICS
$ENV{HTTPS_DEBUG} =3D 1;
# DEFAULT SSL VERSION
$ENV{HTTPS_VERSION} =3D '3';
#$ENV{HTTPS_CERT_FILE} =3D 'C:/Perl/certs/cert.pem'; #$ENV{HTTPS_KEY_FILE}
=3D 'C:/Perl/certs/cert.pem'; $ENV{HTTPS_CA_FILE} =3D
'val.banking.worldsavings.com.cer';
$ENV{HTTPS_CA_DIR} =3D 'C:/Perl/certs/';
my $browser =3D LWP::UserAgent->new();
#$browser->proxy('http', 'http://sa1isa4:80/');
$request =3D HTTP::Request->new (GET =3D>
'https://val.banking.worldsavings.com/wsb/WDSHeartBeat?heart beat=3DPWS');
$response =3D $browser->request($request);
=09
my $content;
if ( $response->is_error() ) {
printf "unable to connect to $WDSHeartBeat{$dbname}, response:
%s\n", $response->status_line;
exit;
}
$list =3D $response->content();
I am using ActivePerl 5.6, I install openssl-0.9.7c-bin.exe,
libwww-perl-5.64, libnet-1.19 and Cypt-SSLeay.
I can access the HTTPS through browser and it has a certificate. I
downloaded the certificate and saved it to C:\Perl\certs directory and
named it 'val.banking.worldsavings.com.cer'.
I am still getting this error:
LWP::UserAgent::new: ()
LWP::UserAgent::request: ()
LWP::UserAgent::send_request: GET
https://val.banking.worldsavings.com/wsb/WDSHeartBeat?heartb eat=3DPWS
LWP::UserAgent::_need_proxy: Not proxied
LWP::Protocol::http::request: ()
LWP::UserAgent::request: Simple response: Internal Server Error unable
to connect to
https://val.banking.worldsavings.com/wsb/WDSHeartBeat?heartb eat=3DPWS,
response: 500 proxy connect failed: PROXY ERROR HEADER, could be non-SSL
URL: HTTP/1.1 407 Proxy Authentication Required ( The ISA Server
requires authorization to fulfill the request. Access to the Web Proxy
service is denied. ) Via:1.1 SA1ISA4
Proxy-Authenticate: NTLM
Proxy-Authenticate: Kerberos
Proxy-Authenticate: Negotiate
Pragma: no-cache
Cache-Control: no-cache
Content-Type: text/html
Content-Length: 2375
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML
dir=3Dltr><HEAD><TITLE>The page cannot be displayed</TITLE> <STYLE>A:link
{
FONT: 8pt/11pt verdana; COLOR: #ff0000
}
A:visited {
FONT: 8pt/11pt verdana; COLOR: #4e4e4e
}
</STYLE>
<META content=3DNOINDEX name=3DROBOTS>
<META http-equiv=3DContent-Type content=3D"text-html; charset=3DWindows-125=
2">
<META content=3D"MSHTML 5.50.4522.1800" name=3DGENERATOR></HEAD> <BODY
bgColor=3D#ffffff> <TABLE cellSpacing=3D5 cellPadding=3D3 width=3D410>
<TBODY>
<TR>
<TD vAlign=3Dcenter align=3Dleft width=3D360>
<H1 style=3D"FONT: 13pt/15pt verdana; COLOR:
#000000"><!--Problem-->The page
cannot be displayed</H1></TD></TR>
<TR>
<TD width=3D400 colSpan=3D2><FONT
style=3D"FONT: 8pt/11pt verdana; COLOR: #000000">There is a problem
with the
page you are trying to reach and it cannot be
displayed.</FONT></TD></TR>
<TR>
<TD width=3D400 colSpan=3D2><FONT
style=3D"FONT: 8pt/11pt verdana; COLOR: #000000">
<HR color=3D#c0c0c0 noShade>
<P>Please try the following:</P>
<UL>
<LI>Click the Refresh button,
or try again later.<BR>
<LI>Open the Web site
home page, and then look for links to the information you want.
<LI>If you typed the page address in the Address bar, make sure
that it
is spelled correctly.<BR>
<LI>Verify that the Internet access policy on your network
allows you
to view this this page.</LI>
<LI>If you believe you should be able to view this directory or
page,
please contact the Web site administrator by using the e-mail
address or
phone number listed on the Web site
home page. </LI></UL>
<H2 style=3D"FONT: 8pt/11pt verdana; COLOR: #000000">HTTP 407 Proxy
Authentication Required - The ISA Server requires authorization to
fulfill the request. Access to the Web Proxy service is denied.
(12209)<BR>Internet Security and Acceleration Server</H2>
<HR color=3D#c0c0c0 noShade>
<P>Technical Information (for support personnel)</P>
<UL>
<LI>Background:<BR>The gateway could not retrieve the requested
page.<P></P></LI>
<LI>ISA Server: SA1ISA4.worldsavings.com<BR>
Via: <BR><BR>Time: 6/7/2005 11:08:27 PM GMT
</LI></UL></FONT></TD></TR></TBODY></TABLE></BODY></HTML>
;
I wonder whether I should use proxy at all.
Your help is greatly appreciated.
Thanks.
-Indra
************************************************************ ***************=
**
If you are not the intended recipient of this e-mail, please notify
the sender immediately. The contents of this e-mail do not amend
any existing disclosures or agreements unless expressly stated.
************************************************************ ***************=
**
